package proxy.demo1;

public class UserDaoProxy implements IUserDao{
    IUserDao userDao;

    public UserDaoProxy(IUserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void save(int age) {
        System.out.println("事务开始");
        userDao.save(age);
        System.out.println("事务提交了");
    }
}
